Skip to content

Comments

Feat: add stream warning#373

Merged
S1ro1 merged 3 commits intomainfrom
feat-stream-warning
Nov 27, 2025
Merged

Feat: add stream warning#373
S1ro1 merged 3 commits intomainfrom
feat-stream-warning

Conversation

@S1ro1
Copy link
Member

@S1ro1 S1ro1 commented Nov 23, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 23, 2025 12:45
@github-actions
Copy link

github-actions bot commented Nov 23, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/libkernelbot
  backend.py 235-236
  report.py 324
Project Total  

This report was generated by python-coverage-comment-action

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds functionality to display a warning message when submitted code contains the word "stream", alerting users to properly synchronize streams. The implementation extends the report generation system with an optional extra_text parameter and integrates the stream detection logic into the submission handling flow.

Key Changes:

  • Added an extra_text parameter to generate_report() function to allow prepending custom messages to reports
  • Implemented stream detection logic in handle_submission() that checks submitted code for the word "stream" (case-insensitive) and generates an appropriate warning message
  • Reformatted function signatures for better readability

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/libkernelbot/report.py Added extra_text parameter to generate_report() function to support prepending custom warning messages; includes minor formatting improvements (blank lines and line splits)
src/libkernelbot/backend.py Implemented stream detection logic that generates a warning message when code contains "stream"; integrated with the report generation by passing the warning as extra_text; reformatted submit_full() function signature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

stream_msg = (
"""
> **Your code contains word 'stream'**. If you are human and use non-default stream, please make sure that you properly synchronize the stream.
> If you do not, your submission will, be deleted and not eligible for prices.
Copy link

Copilot AI Nov 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling error: "prices" should be "prizes". The warning message refers to competition prizes, not prices.

Suggested change
> If you do not, your submission will, be deleted and not eligible for prices.
> If you do not, your submission will, be deleted and not eligible for prizes.

Copilot uses AI. Check for mistakes.
stream_msg = (
"""
> **Your code contains word 'stream'**. If you are human and use non-default stream, please make sure that you properly synchronize the stream.
> If you do not, your submission will, be deleted and not eligible for prices.
Copy link

Copilot AI Nov 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar error: There is an extra comma after "will". The text should read "your submission will be deleted" instead of "your submission will, be deleted".

Suggested change
> If you do not, your submission will, be deleted and not eligible for prices.
> If you do not, your submission will be deleted and not eligible for prices.

Copilot uses AI. Check for mistakes.
@S1ro1 S1ro1 merged commit 81349cd into main Nov 27, 2025
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants